<template>
  <input type="text" :value="searchText" placeholder="输入关键词搜索" @input="updateSearchText($event.target.value)"/>
</template>

<script>
export default {
  data() {
    return {
      searchText: "",
    };
  },
  methods: {
    updateSearchText(newValue) {
      this.searchText = newValue;
      this.$emit('input', newValue);
    }
  }
};
</script>

<style></style>
